package com.smart.tv.boundary;

import java.io.File;

import android.os.Environment;
import android.util.Log;

public class Music {
	public Music(String folderName){
		mFolderName = folderName;
	}
	public File[] getAllFileMusic(){
		
		String musicUrl = Environment.getExternalStorageDirectory().getPath() + "/"+mFolderName!=null ? mFolderName:"music";
		File folder = new File("/sdcard/"+musicUrl);
		return folder.listFiles();
	}
	
	public String[] getAllFileName(){
		String musicUrl = Environment.getExternalStorageDirectory().getAbsolutePath() + "/"+mFolderName!=null ? mFolderName:"music";
		File folder = new File("/sdcard/"+musicUrl);
		return folder.list();
		
	}
	
	public String getPathAbsolute(String musicFile){
		return Environment.getExternalStorageDirectory() + "/"+mFolderName!=null ? mFolderName:"music"+"/"+musicFile;
		
	}
	
	private final String mFolderName ;
}
